<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <SCRIPT type="text/javascript" th:src="@{/js/jquery-1.7.2.min.js}"></SCRIPT>

    <script type="text/javascript">
        $(function (){
            alert("------------");
            alert($("#userName").val());
        });
    </script>
    <input type="text" id="userName" value="999">
    <img th:src="@{/img/meinv.jpeg}">
</body>
</html>